home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Treccani Italiana Di Scienze Lettere Ed Arti
/
[Enciclopedia] Treccani Italiana di scienze lettere ed arti.iso
/
pc
/
data
/
xxi_appendice_dvd.swf
/
scripts
/
__Packages
/
IconCellRenderer.as
< prev
next >
Wrap
Text File
|
2007-11-08
|
1KB
|
56 lines
class IconCellRenderer extends mx.core.UIComponent
{
function IconCellRenderer()
{
super();
}
function createChildren(Void)
{
this.firstSizeCompleted = false;
}
function size(Void)
{
this.invalidate();
}
function draw(Void)
{
if(this.icon_mc != undefined)
{
this.icon_mc._x = (this.__width - this.icon_mc._width) / 2;
}
}
function setValue(str, item, sel)
{
if(item == undefined)
{
if(this.icon_mc != undefined)
{
this.icon_mc.removeMovieClip();
delete this.icon_mc;
}
return undefined;
}
if(this.icon_mc != undefined)
{
this.icon_mc.removeMovieClip();
}
var _loc2_ = this.columnIndex;
var _loc5_ = this.listOwner.getColumnAt(_loc2_).columnName;
var _loc3_ = this.listOwner.getColumnAt(_loc2_).iconFunction;
if(_loc3_ != undefined)
{
var _loc4_ = _loc3_(item,_loc5_);
if(_loc4_ != undefined)
{
this.icon_mc = this.createObject(_loc4_,"icon_mc",20);
this.icon_mc._x = (this.__width - this.icon_mc._width) / 2;
this.icon_mc._y = (this.__height - this.icon_mc._height) / 2;
}
}
}
function getPreferredHeight(Void)
{
return this.owner.__height;
}
}